package demo05;

public class HomeInsurance implements Insurance {
    private  double houseValue;
    private  int houseArea;
    public  HomeInsurance(double houseValue,int houseArea){
        this.houseValue=houseValue;
        this.houseArea=houseArea;
    }
    @Override
    public double a() {
        double basePremium=houseValue*0.015;
        if(houseArea>100){
            return basePremium+basePremium*0.05;
        }
        return 0;
    }
}
